using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
namespace Test.Log {
	class EbLogProc {
		static void MainX() {

			DAL dal=new DAL();
			//dal.NonQry("create table stol(inserted datetime,ip varchar(15))");
			//string[] lines=File.ReadAllLines("C:\\stol.log");
			WebClient wc=new WebClient();
			wc.Proxy.Credentials=CredentialCache.DefaultNetworkCredentials;
			string[] lines=wc.DownloadString("http://liberumveto.pl/ebay/stol.log").Split('\n');
			dal.NonQry("truncate table stol");

			foreach(string line in lines)
			if(line!=""){
				string[] arr=line.Split('|');
				dal.NonQry("insert into stol(inserted,ip)values('{0}','{1}')",arr[0],arr[1]);
			}

		}
	}
}
